<?
session_start();

include_once("../../Misc.php");
include_once("../../classCol/UID.php");
include_once("../../classCol/classOracleDb.php");
include_once("../../helpers/CHtml.php");
include_once("../../helpers/CJavascript.php");

include_once("../models/fetchers.php");

$align = " align='center' ";

$CHtml      = new CGHtml;
$CJs        = new CGJavascript;
$CLFetchers = new CLFetchers;

$propSubmit = $CJs->jsOnClick("window.close();");

if($_GET["srcJid"]){

  $srcDbManInHdr = "SER_NUM_HDR";
  $srcDbManInDtl = "SER_NUM_DTL";

  $COracle = new oracleDb;

  $COracle->init($_SESSION["ORCL"],
                 $_SESSION["OPASS"],
                 $_SESSION["SID"],
                 _NO_COMMENT);

  if($COracle->connect()){

    $CLFetchers->fetchManEntDetail($COracle,
                                   $_GET["srcNota"],
                                   $_GET["srcModel"],
                                   $srcDbManInDtl,
                                   $manInData);
  }else{

    $jsError = "alert(\"Error: oracle connection failed and so initialisation\");";

    echo $CJs->jsScript(NULL,
                        $jsError);
  }

  $COracle->dc();
}else{

  $manInData = "";
}
?>

<html>

<script LANGUAGE="javascript" SRC="/ecs/tocmenu_43/javascript/misc.js"></script>
<script LANGUAGE="javascript" SRC="/ecs/tocmenu_43/javascript/ajax.js"></script>

<script LANGUAGE="javascript">

</script>

<title> MiniView </title>

<body>

  <textarea name='miniViewEnt'
            style='height:200; width:200'><?=$manInData ?></textarea>

  <?=$CHtml->formSubmit("submit",
                        "close",
                        $propSubmit.
                        $align) ?>

</body>
</html>